<#assign base=request.contextPath>
<!DOCTYPE html> 
<html>
	<head>
		<title></title>
		<meta charset="utf-8">
		<#include "common/reference.ftl" />
		<script type="text/javascript">
		<!--
		$(function(){
			$('#selDict').on('change',function(){
				var value = $(this).val();
				$('#dictId').val(value);
			});
			$('#selDict').trigger('change');
		})
		//-->
		</script>
	</head>
	<body class="$configs["skinName"]">
		<div class="row">
		<#include "common/breadcrumb.ftl">
			<form id="form" role="form" class="form-horizontal" method="post" action="${base}/${form_action}">
				<div class="col-xs-12">
					<div class="widget-box">
						<div class="widget-body">
							<input type="hidden" name="dataId" id="dataId" value="${model.dataId}" >
							<input type="hidden" name="dictId" id="dictId" value="${model.dictId}" >
							<div class="alert alert-warning">
								<strong>提示!</strong>
								字典数据名称、字典数据值不能为空
							</div>
							<div class="form-group">
								<label class="col-sm-3 control-label no-padding-right">
									字典名称
								</label>
								<div class="col-sm-4">
									<select id="selDict">
									<#list dictList as item>
										<option value="${item.dictId}" <#if model.dictId == item.dictId>selected="selected"</#if> >${item.dictName}</option>
									</#list>
									</select>
								</div>
							</div>
							<div class="form-group">
								<label class="col-sm-3 control-label no-padding-right">
									字典数据名称
								</label>
								<div class="col-sm-4">
									<input type="text" id="dataName" name="dataName" value="${model.dataName}" class="form-control">
								</div>
							</div>
							<div class="form-group">
								<label class="col-sm-3 control-label no-padding-right">
									字典数据值
								</label>
								<div class="col-sm-4">
									<input type="text" id="dataValue" name="dataValue" value="${model.dataValue}" class="form-control">
								</div>
							</div>
							<div class="form-group">
								<label class="col-sm-3 control-label no-padding-right">
									是否启用
								</label>
								<div class="col-sm-4">
									<input class="ace ace-switch ace-switch-5" type="checkbox" name="enabled" <#if model == null || model.enabled>checked="checked"</#if> >
									<span class="lbl"></span>
								</div>
							</div>
							<div class="clearfix form-actions">
								<div class="col-md-offset-3 col-md-9">
									<button id="btnSubmit" class="btn btn-info" type="submit">
										<i class="fa fa-ok bigger-110"></i>
										提 交
									</button>
								</div>
							</div>
						</div>
					</div>
				</div>
			</form>
		</div>
	</body>
</html>